import request from '@/utils/request'

export function getList(params) {
  return request({
    url: 'admin/get-category-list',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'admin/create-category',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'admin/delete-category',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'admin/update-category',
    method: 'post',
    data
  })
}

export function getSelectCategoryList() {
  return request({
    url: 'admin/get-select-category-list',
    method: 'get'
  })
}

export default { add, edit, del, getList }
